using System;
using UnityEngine;
using QFramework;

namespace QFramework.Pacman
{
	public partial class UIGame : ViewController
	{
		private void Awake()
		{
			var uimanager = transform.Find("UI Manager").GetComponent<GameGUINavigation>();
			
			MenuButton.onClick.AddListener(() =>
			{
				uimanager.TogglePause();
			});
			
			// 暂停按钮
			CanvasPause.Quit.onClick.AddListener(() =>
			{
				uimanager.ToggleQuit();
			});
			
			CanvasPause.Resume.onClick.AddListener(() =>
			{
				uimanager.TogglePause();
			});
			
			CanvasQuit.Yes.onClick.AddListener(() =>
			{
				uimanager.Menu();
			});
			
			CanvasQuit.Cancel.onClick.AddListener(() =>
			{
				uimanager.ToggleQuit();
			});
		}

		void Start()
		{
			// Code Here
		}
	}
}
